package com.tjbklx1.thread.prologue01.sync;

public class Printer extends Thread {

	static int i = 0;

	public synchronized void add() {
		i++;
		System.out.println("add :" + i);
	}

	public static synchronized void addStatic() {
		i++;
		System.out.println("addStatic :" + i);
	}

	public void run() {
		for (int i = 0; i < 1000; i++) {
			System.out.print("Nice!");
		}
	}

	public static void main(String[] args) {

	}
}
